package com.hshx.client;

import com.hshx.pojo.Role;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "gateway",
        path = "/systemService",
        contextId = "RoleClient")
public interface RoleClient {
    @RequestMapping("/getAllRole")
    List<Role> getAllRole();

    @RequestMapping("/addRole")
    boolean addRole(@SpringQueryMap Role role);

    @RequestMapping("/updateRole")
    boolean updateRole(@SpringQueryMap Role role);

    @RequestMapping("/removeRole")
    boolean removeRole(@RequestParam(name="role_id") int role_id);

    @RequestMapping("/getRoleOne")
    Role getRoleOne(@RequestParam(name="role_id") int role_id);
}
